package com.yunban.project.api.text_check.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yunban.project.api.text_check.domain.CorrectionHistory;
import com.yunban.project.api.text_check.dto.CorrectionInfoReq;
import net.lab1024.sa.base.config.AsyncConfig;
import org.springframework.scheduling.annotation.Async;

/**
 * @author: lijiajun
 * @date: 2024-11-19
 * @version: 1.0
 */
public interface CorrectionHistoryService extends IService<CorrectionHistory> {
    /**
     * 根据文件MD5进行查询
     *
     * @param md5 文件MD5
     * @return CorrectionHistory
     */
    CorrectionHistory findByFileMd5(String md5);

    /**
     * 异步添加纠错记录
     *
     * @param req 入参
     */
    @Async(AsyncConfig.ASYNC_EXECUTOR_THREAD_NAME)
    void asyncSaveCorrectionInfo(CorrectionInfoReq req);
}
